package com.ztc.service;

import com.ztc.beans.Book;
import com.ztc.beans.Hobby;
import com.ztc.beans.Role;
import com.ztc.beans.User;
import com.ztc.util.Page;
import org.apache.ibatis.annotations.Param;

import java.sql.Timestamp;
import java.util.HashMap;
import java.util.List;

public interface UserService {

    List<User> getUser();
    boolean getusername(String username);
    User Login(@Param("username") String username, @Param("password") String password);
    User register(String username);
    void adduser(User user);
    void borrowBook(@Param("book") Book book, @Param("user") User user, @Param("day") Timestamp day, @Param("day2") int day2);
    void upBookBsum(Book book);
    List<Book> getbook();
    void returnBook(Book book, User user);
    List<User> getusers();
    List<User> getusers(Page page);
    List<Role> getroles();
    List<Hobby> gethobbys();
    User getUserId(String id);
    void updateuser(User user);
    void deUser(@Param("id") int i);
    void zcadduser2(User user);
    boolean getusername2(String username);
    boolean getusername3(String username);
    List<User> getusers2(String mname, String mage, String msex, String mrid, Page page);
    int getUserSum(@Param("name") String name,@Param("age") String age,@Param("sex") String sex,@Param("rid") String rid);

}
